<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>我的相册</title>
<link rel="stylesheet" type="text/css" href="<?php echo assets('css/style.css')?>">
</head>
<body>
<div id="header">
  <div id="logo">Album</div>
  <ul>
    <li><a href="javascript:;"><?php echo $user->userName ?></a></li>
    <li><a href="<?php echo url('album/create') ?>">新建相册</a></li>
    <li><a href="<?php echo url('album/logout') ?>">退出</a></li>
  </ul>
</div>
<div id="content">
<?php if(count($albumList) == 0): ?>
    <div id="new-gallery">还没有任何相册，点这里<a href="<?php echo url('album/create') ?>">创建</a>一个吧</div>
<?php else: ?>
  <div id="wrapper">
    <ul>
	  <?php foreach ($albumList as $album): ?>
	    <li>
		  <img src="<?php echo $album->art ?>" /><span></span>
	      <div>
	        <h4>
            <a href="<?= url('album/detail', ['id' => $album->id]) ?>"><?php echo $album->title ?></a>
            <a href="<?= url('album/delete', ['id' => $album->id]) ?>">delete</a>
          </h4>
	      </div>
	    </li>
	  <?php endforeach; ?>
	</ul>
  </div>
<?php endif; ?>
</div>
<div id="footer">
   @copyright wanzy-php06 use for PHP OOP demo
</div>
</body>
</html>